﻿using App1;
using System;

namespace App2
{
    class Program
    {
        static void Main(string[] args)
        {

            Console.WriteLine("——————————————对象1");
            Console.WriteLine();
            Game g1 = new Game();
            g1.name = "绝地求生";
            g1.category = "战术竞技型射击类沙盒游戏";
            g1.price = 98;        //单价
            g1.stock = 5000;          //库存
            g1.dateTime =DateTime.Now;
            g1.Sale(30);
            Console.WriteLine();


            Console.WriteLine("——————————————对象2");
            Console.WriteLine();
            Game g2 = new Game();
            g2.name = "王者荣耀";
            g2.category = "MOBA类手机游戏";
            g2.price = 10000;        //单价
            g2.stock = 100000;          //库存
            g2.dateTime = DateTime.Now;
            g2.Sale(10);
            Console.WriteLine();


            Console.WriteLine("——————————————对象3");
            Console.WriteLine();
            Game g3 = new Game();
            g3.name = "英雄联盟";
            g3.category = "MOBA类电脑游戏";
            g3.price = 1000;        //单价
            g3.stock = 10000;          //库存
            g3.dateTime = DateTime.Now;
            g3.Sale(20);
            Console.WriteLine();

            /*Game[] games = new Game[3];
            games[0] = g1;
            games[1] = g2;
            games[2] = g3;
            

            for (int i = 0; i < games.Length; i++) 
            {
                games[i].Sale(20);          //销售
                Console.WriteLine();

            }
            */
        }
    }
}
